package com.kingyea.app.market.appBaseInfo.service;

import com.kingyea.app.market.appBaseInfo.bean.AppBaseInfo;
import com.kingyea.app.market.appBaseInfo.bean.AppBaseInfoPublishVo;
import com.kingyea.app.market.appBaseInfo.bean.AppSyncBaseInfo;
import com.kingyea.app.market.appBaseInfo.bean.SyncObjVo;
import com.kingyea.app.market.appBaseInfo.vo.AppBaseInfo2CreatePageInputVO;
import com.kingyea.app.market.condition.AllCondition;
import com.kingyea.app.market.utils.page.PageInfo;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version v1.0.0
 * @description AppBaseInfo 接口
 * @date Created in 2018-02-09 17:34:59
 */
public interface AppBaseInfoService {

    /**
     * 通过ID查找对象
     *
     * @param appCode
     * @return
     */
    AppBaseInfo getById(String appCode) throws Exception;

    /**
     * 列表
     *
     * @param appBaseInfo
     * @return
     */
    Object list(Map<String, Object> appBaseInfo) throws Exception;


    Object getList(Map<String, Object> appBaseInfo) throws Exception;

    Object listInfo(Map<String, Object> appBaseInfo) throws Exception;

    /**
     * 删除
     *
     * @param appCode
     * @return
     */
    int deleteById(String appCode) throws Exception;

    /**
     * 添加
     *
     * @param appBaseInfo
     * @return
     */
    AppBaseInfo save(AppBaseInfo appBaseInfo) throws Exception;

    /**
     * 更新
     *
     * @param appBaseInfo
     * @return
     */
    AppBaseInfo update(AppBaseInfo appBaseInfo) throws Exception;

    List<AppBaseInfo> getByAppType(String appType);

    List<AppBaseInfo> getByMarket(String appMarket);

    Object versionList(Map<String, Object> appBaseInfo) throws Exception;

    Object appList(Map<String, Object> appBaseInfo) throws Exception;

    Object appList_new(Map<String, Object> appBaseInfo) throws Exception;

    AppSyncBaseInfo getSyncList(Map<String, Object> appBaseInfo) throws Exception;

    AppSyncBaseInfo save(AppSyncBaseInfo appSyncBaseInfo) throws Exception;

    SyncObjVo save(SyncObjVo syncObjVo) throws Exception;

    /**
     * @Description: 发布的应用列表，关联了market，applicationType
     * @Param: []
     * @return: java.util.List<com.kingyea.app.market.appBaseInfo.bean.AppBaseInfo>
     * @Author: cxc
     * @Date: 2018.04.28 12:05
     */
    PageInfo<AppBaseInfoPublishVo> searchPpublishApp(AllCondition condition) throws Exception;

    PageInfo<AppBaseInfoPublishVo> searchPublishVerify(AllCondition condition) throws Exception;

    /**
     * 新增应用   目前逻辑兼容更新逻辑
     */
    AppBaseInfo2CreatePageInputVO addApp(AppBaseInfo2CreatePageInputVO appBaseInfo2CreatePageInputVO) throws Exception;

    int deleteAllAppInfoByAppCode(String appCode) throws Exception;

    Object deleteAppAuthorizationByAppCode(String appCode) throws Exception;
}
